﻿@{
    var requierd = string.Empty;
    if(Model.ExtendRuleValues!=null && Model.ExtendRuleValues.Count > 0)
    {
        var listrulevalues= Model.ExtendRuleValues as List<InputStyleRule>;
        var requiredModel= listrulevalues.Where(a => a.Type== ValidateType.Required.ToString()).FirstOrDefault();
        if (requiredModel!=null)
        {
            requierd = requiredModel.Message;
        }
    }
    <div class="layui-form-item">
                <label class="layui-form-label @(!string.IsNullOrEmpty(requierd)?"layui-form-required":"")">@Model.DisplayName</label>
                <div class="layui-input-block">
                    <input type="text" name="@Model.AttributeName" @(!string.IsNullOrEmpty(requierd)?"lay-verify=required":"")  placeholder="@requierd yyyy-MM-dd HH:mm:ss"
                           autocomplete="off" lay-verify="date" class="layui-input" value="@Model.DefaultValue"  />
                </div>
  </div>
}
